package Tist1;

//TIP 要<b>运行</b>代码，请按 <shortcut actionId="Run"/> 或
// 点击装订区域中的 <icon src="AllIcons.Actions.Execute"/> 图标。
public class Game {
    public static void main(String[] args) {
        Role r1 = new Role("李俊毅", 100, 100, '男');
        Role r2 = new Role("周末", 100, 10, '女');
        //展示信息
        r1.show();
        r2.show();
        //战斗
        while (true) {
            r1.attack(r2);
            if (r2.getBool() == 0) {
                System.out.println(r1.getName() + "KO" + r2.getName());
                break;
            }
            r2.attack(r1);
            if (r1.getBool() == 0) {
                System.out.println(r2.getName() + "  " + "KO" + "  " + r1.getName());
                break;
            }
        }
        System.out.println("game over");

    }
}